package top.jacktgq.itheima.netty.protocol_design.groupchat.rpc;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Author CandyWall
 * @Date 2021/3/25--18:01
 * @Description 序号生成器，从1开始计数
 */
public class SequenceIdGenerator {
    private static final AtomicInteger id = new AtomicInteger();

    public static int nextId() {
        return id.getAndIncrement();
    }
}
